﻿namespace BorgExt.Behaviors
{
    public interface IRule<T>
    {
        void AddCandidate(T item);

        void Bind(Composer composer);
        void Bind(Slot slot);

        bool CanCompose(T item, out LogEventArgs log);
        bool CanDecompose(T item, out LogEventArgs log);

        void Composed(T item);
        void Composing(T item);

        void Decomposed(T item);
        void Decomposing(T item);

        void RemoveCandidate(T item);

        void Unbind(Composer composer);
        void Unbind(Slot slot);

        EventHandler<T> Compose { get; set; }
        EventHandler<T> Decompose { get; set; }
    }
}

